

#include "vsgUI.h"
#include <QtWidgets/QApplication>
#include <QtWidgets/QMainWindow>
// #include <QTextCodec>
//#include <Windows.h>

int main(int argc, char* argv[])
{
  //AllocConsole();
  //freopen("CONOUT$", "w+t", stdout);
  //freopen("CONIN$", "r+t", stdin);

  QApplication application(argc, argv);
  vsg::CommandLine arguments(&argc, argv);
  // QTextCodec* codec = QTextCodec::codecForName("GBK"/*"UTF-8"*/);//或者"GBK",不分大小写
  // QTextCodec::setCodecForLocale(codec);
  QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
  vsgUI* mainWindow = new vsgUI();
  mainWindow->Init3D();
  mainWindow->show();

  //QMainWindow* window    = new QMainWindow();
  //QWidget* centralwidget = new QWidget(window);
  //centralwidget->setObjectName(QString::fromLocal8Bit("centralwidget"));
  //QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  //centralwidget->setSizePolicy(sizePolicy);
  //// centralwidget->setGeometry(0, 0, this->width(), this->height());
  //window->setCentralWidget(centralwidget);

  //QVBoxLayout* layout = new QVBoxLayout(centralwidget);
  //centralwidget->setLayout(layout);
  //QGraphicsView* mView = new QGraphicsView(window);
  //mView->setObjectName(QString::fromLocal8Bit("graphicsView"));
  //mView->setSizePolicy(sizePolicy);
  //QSize size          = mView->size();
  //QPushButton* button = new QPushButton(centralwidget);
  //button->setText("12345");
  //layout->addWidget(mView);

  //QTVulkan3DRender* m3DRender = new QTVulkan3DRender(window, mView);
  //m3DRender->Initialization();

  //window->show();

  return application.exec();
}
